<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
   
  <meta name="keywords" content="Java Python" />
   
  <meta name="description" content="From Zero to Hero" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>
     朱酱酱的学习博客
  </title>
  <meta name="generator" content="hexo-theme-yilia-plus">
  
  <link rel="shortcut icon" href="/favicon.ico" />
  
  
<link rel="stylesheet" href="/css/style.css">

  
<script src="/js/pace.min.js"></script>


  

  

<link rel="alternate" href="/atom.xml" title="朱酱酱的学习博客" type="application/atom+xml">
</head>

</html>

<body>
  <div id="app">
    <main class="content">
      
<section class="cover">
    
      
      <a class="forkMe" href="https://github.com/Zhuuuuuuuu"
        target="_blank"><img width="149" height="149" src="/images/forkme.png"
          class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
    
  <div class="cover-frame">
    <div class="bg-box">
      <img src="/images/cover4.jpg" alt="image frame" />
    </div>
    <div class="cover-inner text-center text-white">
      <h1><a href="/">朱酱酱的学习博客</a></h1>
      <div id="subtitle-box">
        
        <span id="subtitle"></span>
        
      </div>
      <div>
        
      </div>
    </div>
  </div>
  <div class="cover-learn-more">
    <a href="javascript:void(0)" class="anchor"><i class="ri-arrow-down-line"></i></a>
  </div>
</section>



<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js"></script>

<div id="main">
  <section class="outer">
  <article class="articles">
    
    
    
    
    <article id="post-JVM_Notes/JVM-02-运行时内存结构" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2020/01/25/JVM_Notes/JVM-02-%E8%BF%90%E8%A1%8C%E6%97%B6%E5%86%85%E5%AD%98%E7%BB%93%E6%9E%84/"
    >JVM-02-运行时内存结构</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2020/01/25/JVM_Notes/JVM-02-%E8%BF%90%E8%A1%8C%E6%97%B6%E5%86%85%E5%AD%98%E7%BB%93%E6%9E%84/" class="article-date">
  <time datetime="2020-01-25T04:38:38.000Z" itemprop="datePublished">2020-01-25</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="JVM-02-运行时内存结构"><a href="#JVM-02-运行时内存结构" class="headerlink" title="JVM-02-运行时内存结构"></a>JVM-02-运行时内存结构</h1><h2 id="前序"><a href="#前序" class="headerlink" title="前序"></a>前序</h2><ul>
<li>首先通过过一张图了解Java程序的执行流程</li>
</ul>
<p><img src="https://zhuuu-bucket.oss-cn-beijing.aliyuncs.com/img/20200218180637.png" alt="体系架构"></p>
      
      <a class="article-more-link" href="/2020/01/25/JVM_Notes/JVM-02-%E8%BF%90%E8%A1%8C%E6%97%B6%E5%86%85%E5%AD%98%E7%BB%93%E6%9E%84/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JVM/" rel="tag">JVM</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" rel="tag">读书笔记</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-JVM_Notes/JVM-01-简介" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2020/01/24/JVM_Notes/JVM-01-%E7%AE%80%E4%BB%8B/"
    >JVM-01-简介</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2020/01/24/JVM_Notes/JVM-01-%E7%AE%80%E4%BB%8B/" class="article-date">
  <time datetime="2020-01-24T09:38:38.000Z" itemprop="datePublished">2020-01-24</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="JVM-01-简介"><a href="#JVM-01-简介" class="headerlink" title="JVM-01-简介"></a>JVM-01-简介</h1><p>​    本系列将以当前默认的主流虚拟机HotSpot 为例，详细介绍 Java虚拟机。以 JDK1.7 为主，同时介绍与 JDK1.8 的不同之处，通过Oracle官网以及各种文献进行整理，并加以验证，力求保证这块知识的正确性，完整性。</p>
<p>以下是本系列博客参考的相关文档：</p>
<ol>
<li><strong>JDK规范</strong></li>
</ol>
<ul>
<li>JDK1.7虚拟机规范</li>
</ul>
<p><a href="https://docs.oracle.com/javase/specs/jvms/se7/html/index.html" target="_blank" rel="noopener">https://docs.oracle.com/javase/specs/jvms/se7/html/index.html</a></p>
<ul>
<li>JDK1.8虚拟机规范</li>
</ul>
<p><a href="https://docs.oracle.com/javase/specs/jvms/se8/html/index.html" target="_blank" rel="noopener">https://docs.oracle.com/javase/specs/jvms/se8/html/index.html</a></p>
<ol start="2">
<li>周志明老师：《深入理解Java虚拟机：JVM高级特性与最佳实践》</li>
</ol>
<ol start="3">
<li>陈涛老师：《HotSpot实战》</li>
</ol>
<ol start="4">
<li>Oracle Java SE 8 产品组件 ： <a href="https://docs.oracle.com/javase/8/docs/index.html" target="_blank" rel="noopener">https://docs.oracle.com/javase/8/docs/index.html</a></li>
</ol>
      
      <a class="article-more-link" href="/2020/01/24/JVM_Notes/JVM-01-%E7%AE%80%E4%BB%8B/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JMM/" rel="tag">JMM</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JVM/" rel="tag">JVM</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" rel="tag">读书笔记</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-JavaInterview/多线程JMM-面经" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2020/01/24/JavaInterview/%E5%A4%9A%E7%BA%BF%E7%A8%8BJMM-%E9%9D%A2%E7%BB%8F/"
    >多线程JMM-面经</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2020/01/24/JavaInterview/%E5%A4%9A%E7%BA%BF%E7%A8%8BJMM-%E9%9D%A2%E7%BB%8F/" class="article-date">
  <time datetime="2020-01-24T09:38:38.000Z" itemprop="datePublished">2020-01-24</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="多线程JMM-面经"><a href="#多线程JMM-面经" class="headerlink" title="多线程JMM-面经"></a>多线程JMM-面经</h1><h2 id="前序"><a href="#前序" class="headerlink" title="前序"></a>前序</h2><ul>
<li>本文是针对&lt;深入理解java虚拟机第三版 高效并发&gt; 部分的读书笔记</li>
</ul>
<p>参考：周志明 &lt;深入理解java虚拟机第三版&gt;</p>
      
      <a class="article-more-link" href="/2020/01/24/JavaInterview/%E5%A4%9A%E7%BA%BF%E7%A8%8BJMM-%E9%9D%A2%E7%BB%8F/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JMM/" rel="tag">JMM</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" rel="tag">读书笔记</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-Leetcode/Leetcode-1018-可被5整除的二进制前缀" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2020/01/14/Leetcode/Leetcode-1018-%E5%8F%AF%E8%A2%AB5%E6%95%B4%E9%99%A4%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%89%8D%E7%BC%80/"
    >Leetcode-1018-可被5整除的二进制前缀</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2020/01/14/Leetcode/Leetcode-1018-%E5%8F%AF%E8%A2%AB5%E6%95%B4%E9%99%A4%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%89%8D%E7%BC%80/" class="article-date">
  <time datetime="2020-01-14T07:52:53.000Z" itemprop="datePublished">2020-01-14</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="Leetcode-1018-可被-5-整除的二进制前缀"><a href="#Leetcode-1018-可被-5-整除的二进制前缀" class="headerlink" title="Leetcode-1018-可被 5 整除的二进制前缀"></a>Leetcode-1018-<a href="https://leetcode-cn.com/problems/binary-prefix-divisible-by-5/" target="_blank" rel="noopener">可被 5 整除的二进制前缀</a></h1><h2 id="题目描述"><a href="#题目描述" class="headerlink" title="题目描述"></a>题目描述</h2><ul>
<li><p>给定由若干 0 和 1 组成的数组 A。我们定义 N_i：从 A[0] 到 A[i] 的第 i 个子数组被解释为一个二进制数（从最高有效位到最低有效位）。</p>
</li>
<li><p>返回布尔值列表 answer，只有当 N_i 可以被 5 整除时，答案 answer[i] 为 true，否则为 false。</p>
</li>
</ul>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">示例 1：</span><br><span class="line"></span><br><span class="line">输入：[0,1,1]</span><br><span class="line">输出：[<span class="literal">true</span>,<span class="literal">false</span>,<span class="literal">false</span>]</span><br><span class="line">解释：</span><br><span class="line">输入数字为 0, 01, 011；也就是十进制中的 0, 1, 3 。只有第一个数可以被 5 整除，因此 answer[0] 为真。</span><br><span class="line"></span><br><span class="line">示例 2：</span><br><span class="line"></span><br><span class="line">输入：[1,1,1]</span><br><span class="line">输出：[<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">false</span>]</span><br><span class="line"></span><br><span class="line">示例 3：</span><br><span class="line"></span><br><span class="line">输入：[0,1,1,1,1,1]</span><br><span class="line">输出：[<span class="literal">true</span>,<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">true</span>,<span class="literal">false</span>]</span><br><span class="line"></span><br><span class="line">示例 4：</span><br><span class="line"></span><br><span class="line">输入：[1,1,1,0,1]</span><br><span class="line">输出：[<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">false</span>,<span class="literal">false</span></span><br><span class="line"></span><br><span class="line">提示：</span><br><span class="line"></span><br><span class="line">1 &lt;= A.length &lt;= 30000</span><br><span class="line">A[i] 为 0 或 1</span><br></pre></td></tr></table></figure>
      
      <a class="article-more-link" href="/2020/01/14/Leetcode/Leetcode-1018-%E5%8F%AF%E8%A2%AB5%E6%95%B4%E9%99%A4%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%89%8D%E7%BC%80/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Leetcode/" rel="tag">Leetcode</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E6%95%B0%E5%AD%A6%E5%BD%92%E7%BA%B3%E6%B3%95/" rel="tag">数学归纳法</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-LeetcodeExplore/并查集-合集" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2020/01/06/LeetcodeExplore/%E5%B9%B6%E6%9F%A5%E9%9B%86-%E5%90%88%E9%9B%86/"
    >并查集-合集</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2020/01/06/LeetcodeExplore/%E5%B9%B6%E6%9F%A5%E9%9B%86-%E5%90%88%E9%9B%86/" class="article-date">
  <time datetime="2020-01-06T07:11:53.000Z" itemprop="datePublished">2020-01-06</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="并查集-合集"><a href="#并查集-合集" class="headerlink" title="并查集-合集"></a>并查集-合集</h1><ul>
<li><strong>参考资料</strong><ul>
<li>博客 ： <a href="https://oi-wiki.org/ds/dsu/" target="_blank" rel="noopener">https://oi-wiki.org/ds/dsu/</a></li>
<li>B站课程 ： <a href="https://www.bilibili.com/video/BV13t411v7Fs?p=1" target="_blank" rel="noopener">https://www.bilibili.com/video/BV13t411v7Fs?p=1</a></li>
</ul>
</li>
</ul>
      
      <a class="article-more-link" href="/2020/01/06/LeetcodeExplore/%E5%B9%B6%E6%9F%A5%E9%9B%86-%E5%90%88%E9%9B%86/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Leetcode/" rel="tag">Leetcode</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%B9%B6%E6%9F%A5%E9%9B%86/" rel="tag">并查集</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-personal_server/服务器-JDK配置" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-JDK%E9%85%8D%E7%BD%AE/"
    >云服务器-JDK配置</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-JDK%E9%85%8D%E7%BD%AE/" class="article-date">
  <time datetime="2019-12-25T07:02:24.000Z" itemprop="datePublished">2019-12-25</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="云服务器-JDK配置"><a href="#云服务器-JDK配置" class="headerlink" title="云服务器-JDK配置"></a>云服务器-JDK配置</h1><h2 id="1-JDK下载"><a href="#1-JDK下载" class="headerlink" title="1. JDK下载"></a>1. JDK下载</h2><ul>
<li>进入java下载页(<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" target="_blank" rel="noopener">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a> )</li>
<li>下载java的JDK,选择”jdk-8u161-linux-i586.tar.gz”文件,下载到本地.</li>
</ul>
<h2 id="2-JDK的安装"><a href="#2-JDK的安装" class="headerlink" title="2. JDK的安装"></a>2. JDK的安装</h2><p>因为usr/lib目录下的操作是需要管理员权限的所以要在命令前加sudo</p>
<ul>
<li>确认 /usr/lib/目录下有jvm文件夹，如果没有用 sudo 权限创建 jvm文件夹(进入到该目录下,sudo mkdir jvm)</li>
<li>将下载的文件解压到该目录下(命令:sudo tar zxvf ./jdk-8u161-linux-i586.tar.gz  -C /usr/lib/jvm)</li>
</ul>
<h2 id="3-配置环境变量"><a href="#3-配置环境变量" class="headerlink" title="3. 配置环境变量"></a>3. 配置环境变量</h2><p>打开环境路径文件:sudo vi ~/.profile</p>
<p>添加如下的语句到文末:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">export JAVA_HOME&#x3D;&#x2F;usr&#x2F;lib&#x2F;jvm&#x2F;jdk1.8.0_161</span><br><span class="line">export JRE_HOME&#x3D;$&#123;JAVA_HOME&#125;&#x2F;jre</span><br><span class="line">export CLASSPATH&#x3D;.:$&#123;JAVA_HOME&#125;&#x2F;lib:$&#123;JRE_HOME&#125;&#x2F;lib</span><br><span class="line">export PATH&#x3D;$&#123;JAVA_HOME&#125;&#x2F;bin:$PATH</span><br></pre></td></tr></table></figure>

<p><strong>source ~/.profile， 更新环境变量</strong></p>
<h2 id="4-结果测试"><a href="#4-结果测试" class="headerlink" title="4. 结果测试"></a>4. 结果测试</h2><p>输入 java -version,如果提示对应的java版本信息则安装成功</p>
<p><img src="https://zhuuu-bucket.oss-cn-beijing.aliyuncs.com/img/20200226204947.png" alt=""></p>
<h2 id="5-命令总结"><a href="#5-命令总结" class="headerlink" title="5.命令总结"></a>5.命令总结</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">sudo mkdir jvm</span><br><span class="line">sudo tar zxvf ./jdk-<span class="number">8</span>u161-linux-i586.tar.gz   -C /usr/lib/jvm</span><br><span class="line">sudo vi ~/.profile</span><br><span class="line">export JAVA_HOME=/usr/lib/jvm/jdk1<span class="number">.8</span><span class="number">.0_161</span></span><br><span class="line">export JRE_HOME=$&#123;JAVA_HOME&#125;/jre</span><br><span class="line">export CLASSPATH=.:$&#123;JAVA_HOME&#125;/lib:$&#123;JRE_HOME&#125;/lib</span><br><span class="line">export PATH=$&#123;JAVA_HOME&#125;/bin:$PATH</span><br><span class="line">source ~/.profile</span><br><span class="line">java -version</span><br></pre></td></tr></table></figure>

<h2 id="6-可能出现的问题"><a href="#6-可能出现的问题" class="headerlink" title="6.可能出现的问题"></a>6.可能出现的问题</h2><ol>
<li>程序 ‘java’ 已包含在下列软件包中：<ul>
<li>default-jre</li>
<li>gcj-4.9-jre-headless</li>
<li>gcj-5-jre-headless</li>
<li>openjdk-8-jre-headless</li>
<li>gcj-4.8-jre-headless</li>
<li>openjdk-9-jre-headless<br>请尝试：sudo apt install &lt;选定的软件包&gt;</li>
</ul>
</li>
</ol>
<p>** 解决方法:手动设置系统默认JDK**</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">sudo update-alternatives --install  /usr/bin/java   java  /usr/lib/jvm/jdk1<span class="number">.8</span><span class="number">.0_161</span>/bin/java <span class="number">300</span></span><br><span class="line">    </span><br><span class="line">sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1<span class="number">.8</span><span class="number">.0_161</span>/bin/javac <span class="number">300</span></span><br><span class="line">    </span><br><span class="line">sudo update-alternatives --config java</span><br></pre></td></tr></table></figure>


      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JDK/" rel="tag">JDK</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" rel="tag">云服务器开发环境</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-personal_server/服务器-Tomcat配置" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Tomcat%E9%85%8D%E7%BD%AE/"
    >云服务器-Tomcat配置</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Tomcat%E9%85%8D%E7%BD%AE/" class="article-date">
  <time datetime="2019-12-25T07:02:24.000Z" itemprop="datePublished">2019-12-25</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="云服务器-Tomcat配置"><a href="#云服务器-Tomcat配置" class="headerlink" title="云服务器-Tomcat配置"></a>云服务器-Tomcat配置</h1><h2 id="1-Tomcat的下载"><a href="#1-Tomcat的下载" class="headerlink" title="1.Tomcat的下载"></a>1.Tomcat的下载</h2><p>下载地址:<a href="https://tomcat.apache.org/download-80.cgi" target="_blank" rel="noopener">https://tomcat.apache.org/download-80.cgi</a></p>
<h2 id="2-Tomcat的启动"><a href="#2-Tomcat的启动" class="headerlink" title="2.Tomcat的启动"></a>2.Tomcat的启动</h2><ul>
<li><p>如果你的Tomcat的JDK配置好的话,理论上这一步可以直接把Tomcat启动</p>
</li>
<li><p>如果JDK已经配置好,</p>
<ul>
<li>可以直接进入tomcat服务器的bin目录，然后执行”./startup.sh”命令启动Tomcat服务器.</li>
</ul>
</li>
</ul>
      
      <a class="article-more-link" href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Tomcat%E9%85%8D%E7%BD%AE/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Tomcat/" rel="tag">Tomcat</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" rel="tag">云服务器开发环境</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-personal_server/服务器-Mysql配置" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Mysql%E9%85%8D%E7%BD%AE/"
    >云服务器-Mysql配置</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Mysql%E9%85%8D%E7%BD%AE/" class="article-date">
  <time datetime="2019-12-25T05:02:24.000Z" itemprop="datePublished">2019-12-25</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="云服务器-Mysql配置"><a href="#云服务器-Mysql配置" class="headerlink" title="云服务器-Mysql配置"></a>云服务器-Mysql配置</h1><h2 id="1-安装"><a href="#1-安装" class="headerlink" title="1. 安装"></a>1. 安装</h2><p>（1）升级apt-get</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">apt-get update</span><br></pre></td></tr></table></figure>

<p>如果不是root用户，就要用下面的代码：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get update</span><br></pre></td></tr></table></figure>
      
      <a class="article-more-link" href="/2019/12/25/personal_server/%E6%9C%8D%E5%8A%A1%E5%99%A8-Mysql%E9%85%8D%E7%BD%AE/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Mysql/" rel="tag">Mysql</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" rel="tag">云服务器开发环境</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-Leetcode/Leetcode-056-合并区间" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2019/12/12/Leetcode/Leetcode-056-%E5%90%88%E5%B9%B6%E5%8C%BA%E9%97%B4/"
    >Leetcode-056-合并区间</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/12/Leetcode/Leetcode-056-%E5%90%88%E5%B9%B6%E5%8C%BA%E9%97%B4/" class="article-date">
  <time datetime="2019-12-12T07:52:53.000Z" itemprop="datePublished">2019-12-12</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="Leecode-056-Merge-Intervals"><a href="#Leecode-056-Merge-Intervals" class="headerlink" title="Leecode-056-Merge Intervals"></a>Leecode-056-<a href="https://leetcode-cn.com/problems/merge-intervals/" target="_blank" rel="noopener">Merge Intervals</a></h1><h2 id="思路：分类讨论"><a href="#思路：分类讨论" class="headerlink" title="思路：分类讨论"></a>思路：分类讨论</h2><p><strong>题目描述：</strong></p>
<p>给定一个二维数组，其中的元素表示一个区间，返回重叠的区间或者没有重叠的区间</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Input: [[1,3],[2,6],[8,10],[15,18]]</span><br><span class="line">Output: [[1,6],[8,10],[15,18]]</span><br><span class="line">Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].</span><br><span class="line"></span><br><span class="line">Input: [[1,4],[4,5]]</span><br><span class="line">Output: [[1,5]]</span><br><span class="line">Explanation: Intervals [1,4] and [4,5] are considered overlapping.</span><br></pre></td></tr></table></figure>
      
      <a class="article-more-link" href="/2019/12/12/Leetcode/Leetcode-056-%E5%90%88%E5%B9%B6%E5%8C%BA%E9%97%B4/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Leetcode/" rel="tag">Leetcode</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
    <article id="post-personal_server/MarkDown语法" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h2 itemprop="name">
  <a class="article-title" href="/2019/12/12/personal_server/MarkDown%E8%AF%AD%E6%B3%95/"
    >MarkDown语法</a
  >
</h2>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/12/personal_server/MarkDown%E8%AF%AD%E6%B3%95/" class="article-date">
  <time datetime="2019-12-12T07:02:24.000Z" itemprop="datePublished">2019-12-12</time>
</a>
      
      
      
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <h1 id="MarkDown-语法（快速上手）"><a href="#MarkDown-语法（快速上手）" class="headerlink" title="MarkDown 语法（快速上手）"></a>MarkDown 语法（快速上手）</h1><h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><p>Markdown是一种纯文本格式的标记语言。通过简单的标记语法，它可以使普通文本内容具有一定的格式。</p>
<p><strong>优点：</strong></p>
<p>1、因为是纯文本，所以只要支持Markdown的地方都能获得一样的编辑效果，可以让作者摆脱排版的困扰，专心写作。</p>
<p>2、操作简单。比如:WYSIWYG编辑时标记个标题，先选中内容，再点击导航栏的标题按钮，选择几级标题。要三个步骤。而Markdown只需要在标题内容前加#即可</p>
      
      <a class="article-more-link" href="/2019/12/12/personal_server/MarkDown%E8%AF%AD%E6%B3%95/">阅读更多...</a>
      
      
      <!-- reward -->
      
    </div>
      <!-- copyright -->
      
    <footer class="article-footer">
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/MarkDown/" rel="tag">MarkDown</a></li></ul>


    </footer>

  </div>

  

  
  
  

  

</article>
    
  </article>
  

  
  <nav class="page-nav">
    
    <a class="extend prev" rel="prev" href="/page/43/">上一页</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/42/">42</a><a class="page-number" href="/page/43/">43</a><span class="page-number current">44</span><a class="page-number" href="/page/45/">45</a><a class="page-number" href="/page/46/">46</a><span class="space">&hellip;</span><a class="page-number" href="/page/52/">52</a><a class="extend next" rel="next" href="/page/45/">下一页</a>
  </nav>
  
</section>
</div>

      <footer class="footer">
  <div class="outer">
    <ul class="list-inline">
      <li>
        &copy;
        2019-2021
        Zhuuu
      </li>
      <li>
        
      </li>
    </ul>
    <ul class="list-inline">
      <li>
        
        
        <span>
  <i>PV:<span id="busuanzi_value_page_pv"></span></i>
  <i>UV:<span id="busuanzi_value_site_uv"></span></i>
</span>
        
      </li>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>
    <div class="to_top">
        <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>
      </div>
    </main>
      <aside class="sidebar">
        <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="朱酱酱的学习博客"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/JVM/">JVM</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/JDK%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/">JDK源码</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/">多线程</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/Mysql/">Mysql</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/Redis/">Redis</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E8%AE%BE%E8%AE%A1%E8%80%85%E6%A8%A1%E5%BC%8F/">设计模式</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/MyBatis/">MyBatis</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/SpringMVC/">SpringMVC</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/Spring/">Spring</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/SpringBoot/">SpringBoot</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/">Linux</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/Leetcode/">Leetcode</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E5%89%8D%E7%AB%AF/">前端</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/">网络编程</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/photoshop/">photoshop</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="http://smartzhuuu.lofter.com/" target="_blank" rel="noopener">摄影</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/2020/about">关于我</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
      </aside>
      <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
      
<script src="/js/jquery-2.0.3.min.js"></script>


<script src="/js/jquery.justifiedGallery.min.js"></script>


<script src="/js/lazyload.min.js"></script>


<script src="/js/busuanzi-2.3.pure.min.js"></script>


<script src="/js/share.js"></script>



<script src="/fancybox/jquery.fancybox.min.js"></script>




<script>
  try {
    var typed = new Typed("#subtitle", {
    strings: ['昨夜西风凋碧树。独上高楼，望尽天涯路','衣带渐宽终不悔，为伊消得人憔悴。','众里寻他千百度。蓦然回首，那人却在，灯火阑珊处。'],
    startDelay: 0,
    typeSpeed: 200,
    loop: true,
    backSpeed: 100,
    showCursor: true
    });
  } catch (err) {
  }
  
</script>




<script>
  var ayerConfig = {
    mathjax: true
  }
</script>


<script src="/js/ayer.js"></script>


<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.css">
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script>



<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
      tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
  });

  MathJax.Hub.Queue(function() {
      var all = MathJax.Hub.getAllJax(), i;
      for(i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
      }
  });
</script>

<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.6/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>


<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>
  </div>
</body>

</html>